import { createRouter, createWebHistory,type RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/users',
    name: 'UserList',
    component: () => import('../views/UserList.vue')
  },
  {
    path: '/users/create',
    name: 'CreateUser',
    component: () => import('../views/CreateUser.vue')
  }
]

export default createRouter({
    history: createWebHistory(),
    routes
})
